num = 10

def func():
    #引入global关键字，作用：在局部作用域中声明全局变量
    global num
    num = 100

func()
print(num)